package com.shrct.businessprocess.product.impl;

import com.shrct.businessprocess.product.RCServiceLevel;
import com.shrct.businessprocess.product.proxy.RCServiceLevelProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCSERVICELEVEL_TYPE")
public class RCServiceLevelImpl extends CodeImpl implements RCServiceLevel {
  public RCServiceLevelImpl() {
    super();
  }
  
  public static RCServiceLevel create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.product.RCServiceLevel rCServiceLevel = new com.shrct.businessprocess.product.impl.RCServiceLevelImpl(
    );
    objectFactory.create(rCServiceLevel);
    return rCServiceLevel;			
    
  }
  
  public static RCServiceLevel createRCServiceLevelImpl(final IObjectFactory objectFactory, final Procedure1<RCServiceLevel> init) {
    com.shrct.businessprocess.product.RCServiceLevel rCServiceLevel = new com.shrct.businessprocess.product.impl.RCServiceLevelImpl(
    );
    objectFactory.create(rCServiceLevel);
    init.apply(rCServiceLevel);
    
    return rCServiceLevel;			
    
  }
  
  public RCServiceLevelProxy toProxy() {
    com.shrct.businessprocess.product.proxy.RCServiceLevelProxy proxy = new com.shrct.businessprocess.product.proxy.RCServiceLevelProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
